public class maxmin {
    public static class result{
        private double max;
        private double min;
        public result(double max,double min){
            this.max=max;
            this.min=min;
        }
        public double getMax(){
            return max;
        }
        public double getMin(){
            return min;
        }

    }
    public static result getresult(double[] array){
        double max=Double.MIN_VALUE;
        double min=Double.MAX_VALUE;
        for (double i:array){
            if (i>max){
                max=i;

            }
            if (i<min){
                min=i;
            }
        }
        return new result(max,min);
    }
}
